package com.lsp.microorder.recharge.controller;

import com.lsp.microcommon.common.CommonResult;
import com.lsp.microcommon.entity.RechargeInfo;
import com.lsp.microorder.recharge.service.RechargeInfoService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/app/order")
public class RechargeInfoController {

    @Resource
    private RechargeInfoService rechargeInfoService;

    @PostMapping("/recharge/add")
    public CommonResult addRechargeInfo(@RequestBody RechargeInfo rechargeInfo){
        return CommonResult.success(rechargeInfoService.addRecharge(rechargeInfo));
    }
}
